Optimal. Leaf size=183 \[ \frac {(13 A+2 C) x}{2 a^3}-\frac {2 (76 A+11 C) \sin (c+d x)}{15 a^3 d}+\frac {(13 A+2 C) \cos (c+d x) \sin (c+d x)}{2 a^3 d}-\frac {(A+C) \cos (c+d x) \sin (c+d x)}{5 d (a+a \sec (c+d x))^3}-\frac {(11 A+C) \cos (c+d x) \sin (c+d x)}{15 a d (a+a \sec (c+d x))^2}-\frac {(76 A+11 C) \cos (c+d x) \sin (c+d x)}{15 d \left (a^3+a^3 \sec (c+d x)\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.32, antiderivative size = 183, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 6, integrand size = 33, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {4170, 4105,
3872, 2715, 8, 2717} \begin {gather*} -\frac {2 (76 A+11 C) \sin (c+d x)}{15 a^3 d}+\frac {(13 A+2 C) \sin (c+d x) \cos (c+d x)}{2 a^3 d}-\frac {(76 A+11 C) \sin (c+d x) \cos (c+d x)}{15 d \left (a^3 \sec (c+d x)+a^3\right )}+\frac {x (13 A+2 C)}{2 a^3}-\frac {(11 A+C) \sin (c+d x) \cos (c+d x)}{15 a d (a \sec (c+d x)+a)^2}-\frac {(A+C) \sin (c+d x) \cos (c+d x)}{5 d (a \sec (c+d x)+a)^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2715
Rule 2717
Rule 3872
Rule 4105
Rule 4170
Rubi steps
\begin {align*} \int \frac {\cos ^2(c+d x) \left (A+C \sec ^2(c+d x)\right )}{(a+a \sec (c+d x))^3} \, dx &=-\frac {(A+C) \cos (c+d x) \sin (c+d x)}{5 d (a+a \sec (c+d x))^3}-\frac {\int \frac {\cos ^2(c+d x) (-a (7 A+2 C)+a (4 A-C) \sec (c+d x))}{(a+a \sec (c+d x))^2} \, dx}{5 a^2}\\ &=-\frac {(A+C) \cos (c+d x) \sin (c+d x)}{5 d (a+a \sec (c+d x))^3}-\frac {(11 A+C) \cos (c+d x) \sin (c+d x)}{15 a d (a+a \sec (c+d x))^2}-\frac {\int \frac {\cos ^2(c+d x) \left (-a^2 (43 A+8 C)+3 a^2 (11 A+C) \sec (c+d x)\right )}{a+a \sec (c+d x)} \, dx}{15 a^4}\\ &=-\frac {(A+C) \cos (c+d x) \sin (c+d x)}{5 d (a+a \sec (c+d x))^3}-\frac {(11 A+C) \cos (c+d x) \sin (c+d x)}{15 a d (a+a \sec (c+d x))^2}-\frac {(76 A+11 C) \cos (c+d x) \sin (c+d x)}{15 d \left (a^3+a^3 \sec (c+d x)\right )}-\frac {\int \cos ^2(c+d x) \left (-15 a^3 (13 A+2 C)+2 a^3 (76 A+11 C) \sec (c+d x)\right ) \, dx}{15 a^6}\\ &=-\frac {(A+C) \cos (c+d x) \sin (c+d x)}{5 d (a+a \sec (c+d x))^3}-\frac {(11 A+C) \cos (c+d x) \sin (c+d x)}{15 a d (a+a \sec (c+d x))^2}-\frac {(76 A+11 C) \cos (c+d x) \sin (c+d x)}{15 d \left (a^3+a^3 \sec (c+d x)\right )}+\frac {(13 A+2 C) \int \cos ^2(c+d x) \, dx}{a^3}-\frac {(2 (76 A+11 C)) \int \cos (c+d x) \, dx}{15 a^3}\\ &=-\frac {2 (76 A+11 C) \sin (c+d x)}{15 a^3 d}+\frac {(13 A+2 C) \cos (c+d x) \sin (c+d x)}{2 a^3 d}-\frac {(A+C) \cos (c+d x) \sin (c+d x)}{5 d (a+a \sec (c+d x))^3}-\frac {(11 A+C) \cos (c+d x) \sin (c+d x)}{15 a d (a+a \sec (c+d x))^2}-\frac {(76 A+11 C) \cos (c+d x) \sin (c+d x)}{15 d \left (a^3+a^3 \sec (c+d x)\right )}+\frac {(13 A+2 C) \int 1 \, dx}{2 a^3}\\ &=\frac {(13 A+2 C) x}{2 a^3}-\frac {2 (76 A+11 C) \sin (c+d x)}{15 a^3 d}+\frac {(13 A+2 C) \cos (c+d x) \sin (c+d x)}{2 a^3 d}-\frac {(A+C) \cos (c+d x) \sin (c+d x)}{5 d (a+a \sec (c+d x))^3}-\frac {(11 A+C) \cos (c+d x) \sin (c+d x)}{15 a d (a+a \sec (c+d x))^2}-\frac {(76 A+11 C) \cos (c+d x) \sin (c+d x)}{15 d \left (a^3+a^3 \sec (c+d x)\right )}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(385\) vs. \(2(183)=366\).
time = 1.52, size = 385, normalized size = 2.10 \begin {gather*} \frac {\sec \left (\frac {c}{2}\right ) \sec ^5\left (\frac {1}{2} (c+d x)\right ) \left (600 (13 A+2 C) d x \cos \left (\frac {d x}{2}\right )+600 (13 A+2 C) d x \cos \left (c+\frac {d x}{2}\right )+3900 A d x \cos \left (c+\frac {3 d x}{2}\right )+600 C d x \cos \left (c+\frac {3 d x}{2}\right )+3900 A d x \cos \left (2 c+\frac {3 d x}{2}\right )+600 C d x \cos \left (2 c+\frac {3 d x}{2}\right )+780 A d x \cos \left (2 c+\frac {5 d x}{2}\right )+120 C d x \cos \left (2 c+\frac {5 d x}{2}\right )+780 A d x \cos \left (3 c+\frac {5 d x}{2}\right )+120 C d x \cos \left (3 c+\frac {5 d x}{2}\right )-12760 A \sin \left (\frac {d x}{2}\right )-2960 C \sin \left (\frac {d x}{2}\right )+7560 A \sin \left (c+\frac {d x}{2}\right )+2160 C \sin \left (c+\frac {d x}{2}\right )-9230 A \sin \left (c+\frac {3 d x}{2}\right )-1840 C \sin \left (c+\frac {3 d x}{2}\right )+930 A \sin \left (2 c+\frac {3 d x}{2}\right )+720 C \sin \left (2 c+\frac {3 d x}{2}\right )-2782 A \sin \left (2 c+\frac {5 d x}{2}\right )-512 C \sin \left (2 c+\frac {5 d x}{2}\right )-750 A \sin \left (3 c+\frac {5 d x}{2}\right )-105 A \sin \left (3 c+\frac {7 d x}{2}\right )-105 A \sin \left (4 c+\frac {7 d x}{2}\right )+15 A \sin \left (4 c+\frac {9 d x}{2}\right )+15 A \sin \left (5 c+\frac {9 d x}{2}\right )\right )}{3840 a^3 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.65, size = 153, normalized size = 0.84
method | result | size |
derivativedivides | \(\frac {-\frac {A \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{5}-\frac {C \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{5}+\frac {8 A \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3}+\frac {4 C \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3}-31 A \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-7 C \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+\frac {-28 A \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-20 A \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{2}}+4 \left (13 A +2 C \right ) \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d \,a^{3}}\) | \(153\) |
default | \(\frac {-\frac {A \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{5}-\frac {C \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{5}+\frac {8 A \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3}+\frac {4 C \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3}-31 A \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-7 C \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+\frac {-28 A \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-20 A \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{2}}+4 \left (13 A +2 C \right ) \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d \,a^{3}}\) | \(153\) |
risch | \(\frac {13 A x}{2 a^{3}}+\frac {x C}{a^{3}}-\frac {i A \,{\mathrm e}^{2 i \left (d x +c \right )}}{8 a^{3} d}+\frac {3 i A \,{\mathrm e}^{i \left (d x +c \right )}}{2 a^{3} d}-\frac {3 i A \,{\mathrm e}^{-i \left (d x +c \right )}}{2 a^{3} d}+\frac {i A \,{\mathrm e}^{-2 i \left (d x +c \right )}}{8 a^{3} d}-\frac {2 i \left (150 A \,{\mathrm e}^{4 i \left (d x +c \right )}+45 C \,{\mathrm e}^{4 i \left (d x +c \right )}+525 A \,{\mathrm e}^{3 i \left (d x +c \right )}+135 C \,{\mathrm e}^{3 i \left (d x +c \right )}+745 A \,{\mathrm e}^{2 i \left (d x +c \right )}+185 C \,{\mathrm e}^{2 i \left (d x +c \right )}+485 \,{\mathrm e}^{i \left (d x +c \right )} A +115 C \,{\mathrm e}^{i \left (d x +c \right )}+127 A +32 C \right )}{15 d \,a^{3} \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )^{5}}\) | \(216\) |
norman | \(\frac {-\frac {\left (13 A +2 C \right ) x}{2 a}-\frac {\left (A +C \right ) \left (\tan ^{11}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{20 a d}-\frac {\left (13 A +2 C \right ) x \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 a}+\frac {\left (13 A +2 C \right ) x \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 a}+\frac {\left (13 A +2 C \right ) x \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 a}+\frac {\left (37 A +17 C \right ) \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{60 a d}+\frac {\left (51 A +7 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{4 a d}+\frac {\left (109 A +17 C \right ) \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{12 a d}-\frac {\left (211 A +41 C \right ) \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{30 a d}-\frac {\left (461 A +61 C \right ) \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{30 a d}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{2} \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) a^{2}}\) | \(271\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.51, size = 276, normalized size = 1.51 \begin {gather*} -\frac {A {\left (\frac {60 \, {\left (\frac {5 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {7 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}}\right )}}{a^{3} + \frac {2 \, a^{3} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {a^{3} \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}}} + \frac {\frac {465 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {40 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {3 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}}}{a^{3}} - \frac {780 \, \arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a^{3}}\right )} + C {\left (\frac {\frac {105 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {20 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {3 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}}}{a^{3}} - \frac {120 \, \arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a^{3}}\right )}}{60 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 2.92, size = 184, normalized size = 1.01 \begin {gather*} \frac {15 \, {\left (13 \, A + 2 \, C\right )} d x \cos \left (d x + c\right )^{3} + 45 \, {\left (13 \, A + 2 \, C\right )} d x \cos \left (d x + c\right )^{2} + 45 \, {\left (13 \, A + 2 \, C\right )} d x \cos \left (d x + c\right ) + 15 \, {\left (13 \, A + 2 \, C\right )} d x + {\left (15 \, A \cos \left (d x + c\right )^{4} - 45 \, A \cos \left (d x + c\right )^{3} - {\left (479 \, A + 64 \, C\right )} \cos \left (d x + c\right )^{2} - 3 \, {\left (239 \, A + 34 \, C\right )} \cos \left (d x + c\right ) - 304 \, A - 44 \, C\right )} \sin \left (d x + c\right )}{30 \, {\left (a^{3} d \cos \left (d x + c\right )^{3} + 3 \, a^{3} d \cos \left (d x + c\right )^{2} + 3 \, a^{3} d \cos \left (d x + c\right ) + a^{3} d\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {\int \frac {A \cos ^{2}{\left (c + d x \right )}}{\sec ^{3}{\left (c + d x \right )} + 3 \sec ^{2}{\left (c + d x \right )} + 3 \sec {\left (c + d x \right )} + 1}\, dx + \int \frac {C \cos ^{2}{\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}}{\sec ^{3}{\left (c + d x \right )} + 3 \sec ^{2}{\left (c + d x \right )} + 3 \sec {\left (c + d x \right )} + 1}\, dx}{a^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.48, size = 174, normalized size = 0.95 \begin {gather*} \frac {\frac {30 \, {\left (d x + c\right )} {\left (13 \, A + 2 \, C\right )}}{a^{3}} - \frac {60 \, {\left (7 \, A \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 5 \, A \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{2} a^{3}} - \frac {3 \, A a^{12} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 3 \, C a^{12} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 40 \, A a^{12} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 20 \, C a^{12} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 465 \, A a^{12} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 105 \, C a^{12} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a^{15}}}{60 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 2.69, size = 184, normalized size = 1.01 \begin {gather*} \frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (\frac {A+C}{4\,a^3}+\frac {5\,A+C}{12\,a^3}\right )}{d}+\frac {x\,\left (13\,A+2\,C\right )}{2\,a^3}-\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (\frac {3\,\left (A+C\right )}{2\,a^3}+\frac {3\,\left (5\,A+C\right )}{4\,a^3}+\frac {10\,A-2\,C}{4\,a^3}\right )}{d}-\frac {7\,A\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+5\,A\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left (a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+2\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+a^3\right )}-\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\,\left (A+C\right )}{20\,a^3\,d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________